package com.atguyigu.codesday01.LambdaExpressDemo3;

public class LambdaExpress {

    public static void main(String[] args) {

 /*                     旧版
        Foo foo= new Foo() {
            @Override
            public void sayHello() {
                  System.out.println("一句话学习拉姆达表达式");
            }
        };
        foo.sayHello();                              */

                //LambdaExpress新版

      //  Foo foo = ()->{ System.out.println("一句话学习拉姆达表达式");};foo.sayHello();




     Foo foo =(x,y)->{
         System.out.println();
         return x+y;
     };
        System.out.println(foo.add(6,3));
        System.out.println(foo.sub(6,3 ));
        System.out.println(foo.sub1(17,4));


    }
}
